package com.caiyi.financial.nirvana.sms.controller;

import com.caiyi.financial.nirvana.sms.querybean.LogQueryBean;
import com.caiyi.financial.nirvana.sms.service.SmsLogService;
import com.youyu.common.api.Result;
import io.swagger.annotations.Api;

import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(description = "日志管理")
@RestController
@RequestMapping("sms/admin/log")
public class LogController {
    @Autowired
    private SmsLogService logService;

    @ApiOperation(value = "根据params查找Log详情", notes = "根据params查找Log详情描述")
    @ApiImplicitParam(name = "bean", value = "查找短信参数", required = true, dataType = "LogQueryBean", paramType = "body")
    @PostMapping("/getLogByParams")
    public Result getLogByParams(@RequestBody LogQueryBean bean) {
        return Result.ok(logService.getLogListByParams(bean));
    }
}
